/**
 * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 */

package com.iwindplus.log.server.model;

import com.iwindplus.boot.domain.DocDbBaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 短信验证码日志.
 *
 * @author zengdegui
 * @since 2018/9/1
 */
@Schema(description = "短信验证码日志对象")
@Document(value = "sms_captcha_log")
@Data
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class SmsCaptchaLogDO extends DocDbBaseDO {

    /**
     * 业务流水号.
     */
    @Schema(description = "业务流水号")
    @Indexed(name = "idx_biz_number")
    private String bizNumber;

    /**
     * 短信模板编码.
     */
    @Schema(description = "短信模板编码")
    @Indexed(name = "idx_tpl_code")
    private String tplCode;

    /**
     * 手机.
     */
    @Schema(description = "手机")
    @Indexed(name = "idx_mobile")
    private String mobile;

    /**
     * 验证码.
     */
    @Schema(description = "验证码")
    @Indexed(name = "idx_captcha")
    private String captcha;

    /**
     * 过期时间.
     */
    @Schema(description = "过期时间")
    private LocalDateTime expireTime;

    /**
     * 是否使用（false：未使用，true：已使用）
     */
    @Schema(description = "是否使用（false：未使用，true：已使用）")
    private Boolean used;

    /**
     * 使用时间.
     */
    @Schema(description = "使用时间")
    private LocalDateTime useTime;

    /**
     * 用户主键.
     */
    @Schema(description = "用户主键")
    @Indexed(name = "idx_user_id")
    private Long userId;

    /**
     * 组织主键.
     */
    @Schema(description = "组织主键")
    @Indexed(name = "idx_org_id")
    private Long orgId;
}